# -*- coding: utf-8 -*-
import numpy as n, pylab as p

d1=n.loadtxt("vel1_out-1s.dat")
d001=n.loadtxt("vel1_out-001.dat")
d01=n.loadtxt("vel1_out-01s.dat")
t=n.linspace(0,900,10000)
v=n.sqrt(.1**2+2*400*t/70)
p.plot(t,v,label=r"$\sqrt{v_{0}^2 + \frac{2Pt}{m} }$")

p.plot(d1[:,0],d1[:,1],label="dt=1s")
p.plot(d01[:,0],d01[:,1],label="dt=0.1s")
p.plot(d001[:,0],d001[:,1],label="dt=0.01s")
p.legend(loc=2)
p.title("Comparacao dos Resultados do execA.f90 para diferentes dt")
p.ylabel(r"velocidade $(m/s)$")
p.xlabel(r"tempo $(s)$")
p.show()